package com.server;

import com.domain.Space;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SpaceService {

    public List<Space> selectSpaceAll();

    public List<Space> selectSpaceByUserId(Integer userId);

    public Space selectSpaceByNameAndUserId(@Param("name") String name, @Param("userId") Integer userId);

    public Space selectSpaceByIdAndUserId(@Param("space_id") Integer space_id,@Param("userId") Integer userId);

    public Space selectSpaceByName(@Param("name") String name);

    public Space selectSpaceById(@Param("id") Integer id );

    public List<Space> descCreateDate();

    public Space descCreateDateByUserId(@Param("userId") Integer userId);

    public int insertSpace(Space space);

    public int deleteById(Integer id);

    public int deleteByUserId(@Param("space_id") Integer space_id, @Param("userId") Integer userId);

    public int updateSpaceById(Space space);

    int selectUserIdBySpaceId(int id);

    List<Space> findAllSpace(int page,int pageSize);

    int findSpaceTotal();

}
